<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>图片下载</title>
  <link rel="stylesheet" href="static/css/bootstrap.min.css">
  <link rel="stylesheet" href="static/css/style.css">
</head>

<body>

  <?php
    //引入公共头部header.php
    include 'header.php';
?>

  <div class="container main row">
    <?php
  
    foreach ($list as $key=>$val):
  ?>
    <div class="col-sm-6 col-md-4">
      <div class="thumbnail">
        <img src="<?php echo $val;?>" alt="...">
        <div class="caption">
          <p class="text-center">
            <a href="<?php echo $_SERVER['PHP_SELF'].'?img='.$val;?>"
              class="btn btn-sm btn-success" role="button">下载图片</a>
          </p>
        </div>
      </div>
    </div>
    <?php
    endforeach;
  ?>

  </div>

  <?php
    //引入公共底部footer.php
    include "footer.php";
?>

</body>

</html>